package com.cstar.learnlang.RowMappers;

import com.cstar.learnlang.DataForms.FavVocabularyListDataForm;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;

public class FavVocListRowMapper implements RowMapper {
	@Override
	public Object mapRow(ResultSet rs, int rowNum) throws SQLException {
		FavVocabularyListDataForm data = new FavVocabularyListDataForm();
		data.setRowId(rs.getString("ID"));
		data.setUserId(rs.getString("USER_ID"));
		data.setVocListId(rs.getString("VOCLIST_ID"));
		data.setFromLang(rs.getString("FROM_LANG"));
		data.setToLang(rs.getString("TO_LANG"));
		data.setFromLangText(rs.getString("FROM_LANG_TEXT"));
		data.setToLangText(rs.getString("TO_LANG_TEXT"));
		data.setName(rs.getString("NAME"));
		data.setTags(rs.getString("TAGS"));
		return data;
	} // mapRow
} // FavVocListRowMapper
